import axios from '@/libs/api.request'

export const getChapterList = (seachParams) => {
  return axios.request({
    url: 'chapters',
    method: 'get',
    params: seachParams
  })
}




export const getChapter = (id) => {
  return axios.request({
    url: 'chapters/' + id,
    method: 'get'
  })
}

export const addChapter = (data) => {
  return axios.request({
    url: 'chapters',
    method: 'post',
    data: data
  })
}

export const updateChapter = (id,data) => {
  return axios.request({
    url: 'chapters'+id,
    method: 'put',
    data: data
  })
}

export const deleteChapter = (id) => {
  return axios.request({
    url: 'chapters/'+id,
    method: 'delete'
  })
}